using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Web.Configuration;
using Evaluation3.data;

public partial class DSDiem_DanhSach_ChiTietThongTin : System.Web.UI.Page
{

    ChiTietThongTin objChiTietThongTin;
    OleDbConnection myConnection;
    protected void Page_Load(object sender, EventArgs e)
    {

        String connectinString = WebConfigurationManager.ConnectionStrings["Evaluation"].ConnectionString;
        myConnection = new OleDbConnection(connectinString);
        myConnection.Open();

        objChiTietThongTin = new ChiTietThongTin();
        objChiTietThongTin.ActiveConnection = myConnection;
        objChiTietThongTin.SelectCondition = "MaChiTietThongTin=53";
        objChiTietThongTin.LoadData();

        grd_ChiTietThongTin.DataSource = objChiTietThongTin;
        grd_ChiTietThongTin.DataBind();

    }
    protected void bntEdit_Click(object sender, EventArgs e)
    {

    }
    protected void ASPxHyperLink3_ValidateValue(object source, DevExpress.Web.ASPxDataControls.ValidateValueEventArgs e)
    {

    }
    protected void bntDelete_Click(object sender, EventArgs e)
    {
        grd_ChiTietThongTin.DeleteRow(grd_ChiTietThongTin.FocusedRow);
        objChiTietThongTin.SaveData(Evaluation3.data.MyDataTable.DataTableAction.Delete);
    }
    protected void bntEdit_Click1(object sender, EventArgs e)
    {
        string strMaChiTietThongTin = grd_ChiTietThongTin.FocusedRow.KeyValue.ToString();
        Response.Write(strMaChiTietThongTin);
        Response.Redirect("~/DSDiem/Sua_ChiTietThongTin.aspx?MaChiTietThongTin=" + strMaChiTietThongTin);
    }
    protected void bntInsert_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/DSDiem/Nhap_ChiTietThongTin.aspx");
    }
}
